-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update all api config for keycloak standalone #258
update all api config for keycloak standalone #258
Conversation
Task linked: CU-86bxxxcwe KeyCloak in JeMPI standalone |
WalkthroughThe recent updates introduce new configuration parameters and environment variables across various files, enhancing system and API configuration management. Key changes include the addition of configuration strings in Java classes, adjustments in Docker stack files for environment variables, and modifications in a JSON configuration file. These changes aim to improve the integration and setup process for the application, including enabling Single Sign-On (SSO) and refining API configurations. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
devops/linux/docker/conf/env/create-env-linux-low-1.sh (1)
Line range hint
4-4
: Ensure safe directory changes and separate declaration from assignment.# Correct the potential failure of cd command and separate the declaration from assignment to avoid masking return values. export PROJECT_PATH_APPS_ROOT=$(builtin cd ../../../../../ || exit; pwd) export PROJECT_DIR=$(builtin cd ../../ || exit; pwd)Also applies to: 6-6
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- JeMPI_Apps/JeMPI_API_KC/src/main/java/org/jembi/jempi/AppConfig.java (1 hunks)
- JeMPI_Apps/JeMPI_API_KC/src/main/java/org/jembi/jempi/api/APIKC.java (1 hunks)
- devops/linux/docker/conf/env/create-env-linux-low-1.sh (1 hunks)
- devops/linux/docker/conf/stack/docker-stack-high-0.yml (1 hunks)
- devops/linux/docker/conf/stack/docker-stack-high-1.yml (1 hunks)
- devops/linux/docker/conf/stack/docker-stack-low-0.yml (1 hunks)
- devops/linux/docker/conf/stack/docker-stack-low-1.yml (1 hunks)
- devops/linux/docker/data-config/config-reference-link-dp-api.json (4 hunks)
Files skipped from review due to trivial changes (2)
- devops/linux/docker/conf/stack/docker-stack-low-0.yml
- devops/linux/docker/data-config/config-reference-link-dp-api.json
Additional context used
Shellcheck
devops/linux/docker/conf/env/create-env-linux-low-1.sh
[warning] 4-4: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 4-4: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. (SC2164)
[warning] 6-6: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 6-6: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. (SC2164)
[warning] 16-16: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 18-18: Declare and assign separately to avoid masking return values. (SC2155)
Additional comments not posted (7)
devops/linux/docker/conf/env/create-env-linux-low-1.sh (2)
Line range hint
16-18
: New environment variables for Keycloak configuration are correctly set.
64-65
: Clarify the intention behind setting SSO to false.Also applies to: 68-68
JeMPI_Apps/JeMPI_API_KC/src/main/java/org/jembi/jempi/api/APIKC.java (1)
45-48
: New Keycloak configuration parameters are correctly integrated into the API setup.JeMPI_Apps/JeMPI_API_KC/src/main/java/org/jembi/jempi/AppConfig.java (1)
50-53
: New configuration constants for system and API settings are correctly declared.devops/linux/docker/conf/stack/docker-stack-low-1.yml (1)
513-515
: New environment variables for system and API configuration in theapi-kc
service are correctly set.devops/linux/docker/conf/stack/docker-stack-high-0.yml (1)
701-703
: Ensure the new environment variables are correctly referenced in the application.Verification successful
The new environment variables
SYSTEM_CONFIG_DIR
,API_CONFIG_REFERENCE_FILENAME
,API_CONFIG_MASTER_FILENAME
, andAPI_FIELDS_CONFIG_FILENAME
are correctly referenced and used in the application code, specifically in theAppConfig
andAPIKC
classes. The variables are also properly defined in the Docker Compose files and environment setup scripts.
JeMPI_Apps/JeMPI_API_KC/src/main/java/org/jembi/jempi/AppConfig.java
JeMPI_Apps/JeMPI_API_KC/src/main/java/org/jembi/jempi/api/APIKC.java
JeMPI_Apps/JeMPI_API/src/main/java/org/jembi/jempi/AppConfig.java
JeMPI_Apps/JeMPI_API/src/main/java/org/jembi/jempi/api/API.java
devops/linux/docker/conf/stack/docker-stack-high-0.yml
devops/linux/docker/conf/stack/docker-stack-low-0.yml
devops/linux/docker/conf/stack/docker-stack-low-1.yml
devops/linux/docker/conf/stack/docker-stack-high-1.yml
devops/linux/docker/conf/env/create-env-linux-low-1.sh
devops/linux/docker/conf/env/create-env-linux-high-1.sh
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage. Expect: Proper handling and usage in the application. rg --type yaml 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -C 3Length of output: 17221
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage in the application code. Expect: Proper handling and usage in the application. rg 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -t py -t js -t ts -t java -t go -t rb -t php -t sh -t yaml -t yml -t json -t xml -t properties -t envLength of output: 237
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage in the application code. Expect: Proper handling and usage in the application. rg 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -t py -t js -t ts -t java -t go -t php -t sh -t yaml -t yml -t json -t xml -t properties -t envLength of output: 232
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage in the application code. Expect: Proper handling and usage in the application. rg 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -t py -t js -t ts -t java -t go -t php -t sh -t yaml -t json -t xml -t properties -t envLength of output: 232
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage in the application code. Expect: Proper handling and usage in the application. rg 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -t py -t js -t ts -t java -t go -t php -t sh -t yaml -t json -t xml -t envLength of output: 211
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage in the application code. Expect: Proper handling and usage in the application. rg 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -t py -t js -t ts -t java -t go -t php -t sh -t yaml -t json -t xmlLength of output: 9122
devops/linux/docker/conf/stack/docker-stack-high-1.yml (1)
701-703
: Ensure the new environment variables are correctly referenced in the application.Verification successful
The environment variables
SYSTEM_CONFIG_DIR
,API_CONFIG_REFERENCE_FILENAME
,API_CONFIG_MASTER_FILENAME
, andAPI_FIELDS_CONFIG_FILENAME
are correctly referenced and used in the application code, specifically in theAppConfig
andAPI
classes within the Java files.
JeMPI_Apps/JeMPI_API_KC/src/main/java/org/jembi/jempi/AppConfig.java
JeMPI_Apps/JeMPI_API_KC/src/main/java/org/jembi/jempi/api/APIKC.java
JeMPI_Apps/JeMPI_API/src/main/java/org/jembi/jempi/AppConfig.java
JeMPI_Apps/JeMPI_API/src/main/java/org/jembi/jempi/api/API.java
These references confirm that the environment variables are properly handled and utilized within the application.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage. Expect: Proper handling and usage in the application. rg --type yaml 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -C 3Length of output: 17221
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage in the application code. Expect: Proper handling and usage in the application. rg 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -t py -t js -t ts -t java -t go -t php -t rb -t sh -t yaml -C 3Length of output: 199
Script:
#!/bin/bash # Description: Verify the usage of new environment variables in the application code. # Test: Search for the environment variable usage in the application code. Expect: Proper handling and usage in the application. rg 'SYSTEM_CONFIG_DIR|API_CONFIG_REFERENCE_FILENAME|API_CONFIG_MASTER_FILENAME|API_FIELDS_CONFIG_FILENAME' -t py -t js -t ts -t java -t go -t php -t sh -t yaml -C 3Length of output: 25342
…KeyCloak-in-JeMPI-standalone
Summary by CodeRabbit
New Features
Configuration